#include "DList.h"
void DListNodeText1()
{
	DListNode* plist = DListInit();

	DListNodePushBack(plist, 1);
	DListNodePushBack(plist, 2);
	DListNodePushBack(plist, 3);
	DListNodePushBack(plist, 4);

	//DListNodePushFront(plist, 1);
	//DListNodePushFront(plist, 2);
	//DListNodePushFront(plist, 3);
	//DListNodePushFront(plist, 4);

	DListNodePopBack(plist);
	DListNodePopBack(plist);
	DListNodePopBack(plist);
	DListNodePopBack(plist);
	DListNodePopBack(plist);

	//DListNodePopFront(plist);



	DListPrint(plist);

}

void DListNodeText2()
{
	DListNode* plist = DListInit();

	DListNodePushBack(plist, 1);
	DListNodePushBack(plist, 2);
	DListNodePushBack(plist, 3);
	DListNodePushBack(plist, 4);

	DListNode* pos = DListFind(plist, 1);
	//DListInsert(plist, pos, 10);
	DListErase(plist, pos);

	pos = DListFind(plist, 4);
	//DListInsert(plist, pos, 40);
	DListErase(plist, pos);

	int size = DListSize(plist);

	DListPrint(plist);
	printf("\n%d", size);
	DListDestroy(plist);
	free(plist);
	plist = NULL;
}

int main()
{
	DListNodeText2();
	return 0;
}